import request from '@/utils/request'

export function tasklist() {
  return request({
    url: '/ci/tasklist',
    method: 'get'
  })
}

export function task_list(data) {
  return request({
    url: '/ci/task_list',
    method: 'post',
    data
  })
}

export function search(data) {
  return request({
    url: '/ci/search',
    method: 'post',
    data
  })
}

export function get_group() {
  return request({
    url: '/group/get_group',
    method: 'get'
  })
}

export function sel_taskcase(id) {
  return request({
    url: '/ci/sel_taskcase/' + id,
    method: 'get'
  })
}

export function begtask(id) {
  return request({
    url: '/ci/begtask/' + id,
    method: 'get'
  })
}

export function stoptask(id) {
  return request({
    url: '/ci/stoptask/' + id,
    method: 'get'
  })
}

export function deltask(id) {
  return request({
    url: '/ci/deltask/' + id,
    method: 'get'
  })
}

export function add_task(data) {
  return request({
    url: '/ci/add_task',
    method: 'post',
    data
  })
}

export function uptask_byid(data) {
  return request({
    url: '/ci/uptask_byid',
    method: 'post',
    data
  })
}
export function get_project(group_id) {
  return request({
    url: '/project/get_project/' + group_id,
    method: 'get'
  })
}

export function sel_case(data) {
  return request({
    url: '/ci/sel_case',
    method: 'post',
    data
  })
}

export function addcase(data) {
  return request({
    url: '/ci/addcase',
    method: 'post',
    data
  })
}

export function dell_taskcase(data) {
  return request({
    url: '/ci/dell_taskcase',
    method: 'post',
    data
  })
}
export function getInfo(token) {
  return request({
    url: '/mock/user/info',
    method: 'get',
    params: { token }
  })
}
